package com.neu.smty.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.common.utils.DateUtils;
import com.neu.smty.domain.HealthPackage;
import com.neu.smty.mapper.HealthPackageMapper;
import com.neu.smty.service.IHealthPackageService;

/**
 * 套餐管理Service业务层处理
 * 
 * @author ljxl
 * @date 2023-09-21
 */
@Service
public class HealthPackageServiceImpl implements IHealthPackageService 
{
    @Autowired
    private HealthPackageMapper healthPackageMapper;

    /**
     * 查询套餐管理
     * 
     * @param id 套餐管理ID
     * @return 套餐管理
     */
    @Override
    public HealthPackage selectHealthPackageById(String id)
    {
        return healthPackageMapper.selectHealthPackageById(id);
    }

    /**
     * 查询套餐管理列表
     * 
     * @param healthPackage 套餐管理
     * @return 套餐管理
     */
    @Override
    public List<HealthPackage> selectHealthPackageList(HealthPackage healthPackage)
    {
        return healthPackageMapper.selectHealthPackageList(healthPackage);
    }

    /**
     * 新增套餐管理
     * 
     * @param healthPackage 套餐管理
     * @return 结果
     */
    @Override
    public int insertHealthPackage(HealthPackage healthPackage)
    {
        healthPackage.setCreateTime(DateUtils.getNowDate());
        return healthPackageMapper.insertHealthPackage(healthPackage);
    }

    /**
     * 修改套餐管理
     * 
     * @param healthPackage 套餐管理
     * @return 结果
     */
    @Override
    public int updateHealthPackage(HealthPackage healthPackage)
    {
        return healthPackageMapper.updateHealthPackage(healthPackage);
    }

    /**
     * 批量删除套餐管理
     * 
     * @param ids 需要删除的套餐管理ID
     * @return 结果
     */
    @Override
    public int deleteHealthPackageByIds(String[] ids)
    {
        return healthPackageMapper.deleteHealthPackageByIds(ids);
    }

    /**
     * 删除套餐管理信息
     * 
     * @param id 套餐管理ID
     * @return 结果
     */
    @Override
    public int deleteHealthPackageById(String id)
    {
        return healthPackageMapper.deleteHealthPackageById(id);
    }
}
